		
		<h3 class="name">
		{{__($step_info['Flowstep']['name'])}}
		
		{{if in_array('add',$allowactions)}}
			<a class="btn btn-warning pull-right" href="{{$this->Html->url('/flowsteps/operate/'.$step_id.'/'.$item['id'])}}?action=add" title="{{$step_info['Flowstep']['name']}}">
			<i class="glyphicon glyphicon-plus"></i> &nbsp;{{__('Add')}}</a>
		{{/if}}
		</h3>  
		
		<div class="detail btline2 clearfix ui-portlet-list ">
		
		<div>
			<a href="{{$this->Html->url('/flowsteps/operate/customers')}}" class="btn btn-primary">{{__('Customers')}}</a>
			<a href="{{$this->Html->url('/flowsteps/operate/customer_contacts')}}" class="btn btn-primary">{{__('Customer Contact')}}</a>
			<a href="{{$this->Html->url('/flowsteps/operate/customer_tracks')}}" class="btn btn-primary">{{__('Contact Track')}}</a>
			<a href="{{$this->Html->url('/flowsteps/operate/customer_opportunities')}}" class="btn btn-primary">{{__('Customer Opportunity')}}</a>
			
		</div>
	<br/>
	<form method="get" class="form-inline mb10" action="{{getSearchLinks($this->request,array(),array('name'))}}">
			{{loop $_GET $k $v}}
				<?php if($k=="name" || $k=="page") continue; ?>
				<input type="hidden" name="{{$k}}" value="{{$v}}">
			{{/loop}}
	  <input type="text" value="{{$_GET['name']}}" name="name" class="form-control"> <button type="submit">{{__('Search')}}</button>
	  </form>
			<table id="flowstep-datas-{{$step_id}}" class="table">
			<thead>
				<tr style="height:32px;">
					{{loop $datalist[0][$flow_model] $k $v}}
						<?php if(!in_array($k,$list_fields)) continue; ?>
						<th>{{$k}}</th>
					{{/loop}}
					<th> {{__('Operations')}}</th>
				</tr>
			</thead>
			
			<tbody>
			{{loop $datalist $item_all}}
				<?PHP $item = $item_all[$flow_model];
					$slug = $step_info['Flowstep']['slug'] ? $step_info['Flowstep']['slug'] : $step_info['Flowstep']['id'];
				?>
				<tr>
				{{loop $item $k $v}}
					<?php if(!in_array($k,$list_fields)) continue; ?>
					<td>{{$v}}</td>
				{{/loop}}
					<td>
					{{loop $allowactions $action}}
						<?php if($action == 'add') continue;?>
					<a class="btn btn-primary btn-xs" href="{{$this->Html->url('/flowsteps/operate/'.$slug.'/'.$item['id'])}}?action={{$action}}" title="{{$step_info['Flowstep']['name']}}">{{__(Inflector::camelize($action))}}</a>
					{{/loop}}
					</td>
				</tr>
			{{/loop}}
			</tbody>
			
			
			<tfoot>
				<tr style="height:32px;">
					{{loop $datalist[0][$flow_model] $k $v}}
						<?php if(!in_array($k,$list_fields)) continue; ?>
						<th>{{$k}}</th>
					{{/loop}}
					<th> {{__('Operations')}}</th>
				</tr>
			</tfoot>
			
			</table>
			</div>
			<div>{{$page_navi}}</div>
		
{{$this->Html->css(array('jquery.dataTables.css',));}}
{{$this->Html->script(array('jquery/jquery.dataTables.min.js',))}}
<script>
$(document).ready( function () {
    //$('#flowstep-datas-{{$step_id}}').DataTable({paging:false});
} );
</script>
